﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Collections.Generic;
using NetBay.Core.BusinessEntities.Workflow;
using NetBay.Core.BusinessEntities.Workflow.Rules;

namespace Rio.Framework.Pages.Events
{
    public delegate void WorkflowHistoricEventHandler(WorkflowHistoricEventArgs args);

    public class WorkflowHistoricEventArgs
    {
        public IEnumerable<WorkflowInstance> Historic { get; set; }
        public IEnumerable<WorkflowItem> HistoricForInstance { get; set; }
        public IEnumerable<WorkflowHisto> HistoricForDocument { get; set; }
        public WorkflowInstance WorkflowInstance { get; set; }
        public Rules WorkflowRules { get; set; }
        public object Sender { get; set; }

        public WorkflowHistoricEventArgs(object sender)
        {
            Sender = sender;
        }

        public WorkflowHistoricEventArgs(IEnumerable<WorkflowInstance> historic, object sender)
            :this(sender)
        {
            Historic = historic;
        }

        public WorkflowHistoricEventArgs(IEnumerable<WorkflowItem> historicForInstance, object sender)
            : this(sender)
        {
            HistoricForInstance = historicForInstance;
        }

        public WorkflowHistoricEventArgs(IEnumerable<WorkflowHisto> historicForDocument, object sender)
            : this(sender)
        {
            HistoricForDocument = historicForDocument;
        }

        public WorkflowHistoricEventArgs(WorkflowInstance workflowInstance)
        {
            WorkflowInstance = workflowInstance;
        }

        public WorkflowHistoricEventArgs(Rules workflowRules)
        {
            WorkflowRules = workflowRules;
        }
    }
}
